<div id="app" class="row osr-edit-page">
    <section class="osr-panel article">

        <!-- 文章头-->
        <h3>
            {[about_us.title]}
        </h3>
        <br>
        <article>
            <!-- 正文-->
            <div v-html="about_us.text_html" v-highlight></div>
            <!-- //正文-->
        </article>
    </section>

</div>

<script src="/theme/static/js/markdown/marked.min.js?v={{g.site_global.site_config.STATIC_FILE_VERSION}}"></script>
<link href="/theme/static/css/highlight-style-github.css?v={{g.site_global.site_config.STATIC_FILE_VERSION}}" rel="stylesheet">
<script src="/theme/static/js/highlight.js?v={{g.site_global.site_config.STATIC_FILE_VERSION}}"></script>
<script>

     Vue.directive('highlight',function (el) {
      let blocks = el.querySelectorAll('pre code');
      blocks.forEach((block)=>{
        hljs.highlightBlock(block)
      })
    })

    var vue = new Vue({
      el: '#app',
      delimiters:['{[', ']}'],
      data:{
            about_us:{},
            name:"",
      },
      filters: {
            formatDate: function (time) {
              return irrformatDate(time, "yyyy-MM-dd hh:mm");
            }
      }
    })

    // 加载完页面执行
    $(document).ready(function(){
        vue.name = $("#name").attr("content");
        get_global(vue.name);
        nav_active("head_li_"+vue.name);
    });

    function get_global(name){
        vue.name = name;
        var conditions = [
             {
                type:"text",
                names:[vue.name],
                result_key:"about_us"
             }
        ]
        var d ={
            conditions:JSON.stringify(conditions)

        }

        var result = osrHttp("GET","/api/global/media", d, args={not_prompt:true});
        result.then(function (r) {
            vue.about_us = r.data.medias.about_us[0];
        });
    }

</script>